//
//  DMRootVC.m
//  DistributionMall
//
//  Created by JHnoplan on 2018/10/14.
//  Copyright © 2018年 JHnoplan. All rights reserved.
//

#import "DMRootVC.h"
#import "DMTabBarController.h"
#import "YJHGuidePageViewController.h"
#import "DMLoginVC.h"
#import "DMNavigationController.h"

@implementation DMRootVC

+(UIViewController *)chooseWindowRootVC
{
    NSString *currVersion=[NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
    NSString *lastVersion=DMGetUD(@"version");
    UIViewController *rootVc;
    if (![currVersion isEqualToString:lastVersion]) {
        rootVc=[[YJHGuidePageViewController alloc]init];
        DMSaveUD(currVersion, @"version");
    }else
    {
//        rootVc = [DMTabBarController new];
        
        rootVc=[[DMNavigationController alloc] initWithRootViewController:[DMLoginVC new]];
        
    }
    return rootVc;
}

@end
